sub_nums=[2:12,14:20,22:37,39,40];

%specify model for naming (must change model argument in deconvolve
%funciton
%model='BLOCK_21';
model='BLOCK_81';
test='obj_disp';


for cur_sub=1:length(sub_nums)
    if sub_nums(cur_sub)<10
        s=['0',num2str(sub_nums(cur_sub))]
    else
        s=num2str(sub_nums(cur_sub))
    end
    
    cd(['~/../../ncf/cushman/Regan/desert_island/desisl_',s,'/desisl_',s,'.results'])
    
    unix(sprintf(['3dDeconvolve -input pb04.desisl_',s,'.r01.scale+orig ' ...
        'pb04.desisl_',s,'.r02.scale+orig ' ...
        'pb04.desisl_',s,'.r03.scale+orig ' ...
        'pb04.desisl_',s,'.r04.scale+orig ' ...
        'pb04.desisl_',s,'.r05.scale+orig ' ...
        'pb04.desisl_',s,'.r06.scale+orig ' ...
        'pb04.desisl_',s,'.r07.scale+orig ' ...
        'pb04.desisl_',s,'.r08.scale+orig ' ...
        'pb04.desisl_',s,'.r09.scale+orig ' ...
        'pb04.desisl_',s,'.r10.scale+orig ' ...
        'pb04.desisl_',s,'.r11.scale+orig ' ...
        'pb04.desisl_',s,'.r12.scale+orig ' ...
        'pb04.desisl_',s,'.r13.scale+orig ' ...
        'pb04.desisl_',s,'.r14.scale+orig ' ...
        'pb04.desisl_',s,'.r15.scale+orig ' ...
        'pb04.desisl_',s,'.r16.scale+orig ' ...
        '-mask full_mask_fewzeros.desisl_',s,'+orig ' ...
        '-polort 3 ' ... 
        '-num_stimts 7 ' ...
        '-stim_times_IM 1 all_obj_disp_times.1D ''BLOCK(2,1)'' ' ...
        '-stim_label 1 all_obj_disp_times ' ...
        '-stim_file 2 ''full_motion.1D[0]'' ' ...
        '-stim_label 2 mc_params1 ' ...
        '-stim_base 2 ' ...
        '-stim_file 3 ''full_motion.1D[1]'' ' ...
        '-stim_label 3 mc_params2 ' ...
        '-stim_base 3 ' ...
        '-stim_file 4 ''full_motion.1D[2]'' ' ...
        '-stim_label 4 mc_params3 ' ...
        '-stim_base 4 ' ...
        '-stim_file 5 ''full_motion.1D[3]'' ' ...
        '-stim_label 5 mc_params4 ' ...
        '-stim_base 5 ' ...
        '-stim_file 6 ''full_motion.1D[4]'' ' ...
        '-stim_label 6 mc_params5 ' ...
        '-stim_base 6 ' ...
        '-stim_file 7 ''full_motion.1D[5]'' ' ...
        '-stim_label 7 mc_params6 ' ...
        '-stim_base 7 ' ...
        '-xjpeg ',model,'_',test,'_LSA.glm_matrix_all.jpg -x1D ',model,'_',test,'_LSA.xmat_all ' ...
        '-bucket ',model,'_',test,'_LSA.stats_all.',s]));
    
end